//
//  UEButton.m
//  UEP
//
//  Created by Bcc on 12/4/15.
//  Copyright © 2015 eReach. All rights reserved.
//

#import "UEButton.h"
#import "UIButton+Extension.h"
@implementation UEButton
-(void)awakeFromNib
{
    [super awakeFromNib];
    [self setBtnStyle];
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super initWithCoder:aDecoder];
    if (self) {
        [self setBtnStyle];
    }
    return self;
    
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self setBtnStyle];
    }
    return self;
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setBtnStyle];
    }
    return self;
}

- (void)setBtnStyle
{
    self.layer.cornerRadius = self.frame.size.width/2;
    self.layer.masksToBounds = YES;
    self.layer.borderColor = [UIColor whiteColor].CGColor;
    self.layer.borderWidth = 2;
    self.titleLabel.font = DEFAULT_FONT_20;
    [self setBackgroundColor:[UIColor clearColor] forState:UIControlStateNormal];
    [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self setBackgroundColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
    [self setTitleColor:Blue_Color forState:UIControlStateHighlighted];
    
}

@end
